package com.bcx.service;

import com.bcx.mapper.PersonMapper;
import com.bcx.pojo.Person;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class PersonServiceImpl implements PersonService {
    @Resource
    PersonMapper personMapper;
    @Override
    public List<Person> selectAll() {
        return personMapper.selectByExample(null);
    }

    @Override
    public int add(Person person) {
        return personMapper.insert(person);
    }


    @Override
    public int delete(Integer id) {
        return personMapper.deleteByPrimaryKey(id);
    }
}
